package com.tj.jinzao.activity;


import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;

import com.tj.jinzao.R;
import com.tj.jinzao.base.BaseActivity;
import com.tj.jinzao.fragment.HealthReportListFragment;

/**
 * 健康报告
 * Created by wjy on 2019/1/5.
 */
public class HealthActivity extends BaseActivity {

    public static void start(Context context, long id, String name){
        context.startActivity(new Intent(context, HealthActivity.class)
                .putExtra("id",id)
                .putExtra("name", name));
    }
    @Override
    public int getLayoutResource() {
        return R.layout.base_activity_fragment_layout;
    }

    @Override
    protected Fragment createFragment() {
        long id = getIntent().getIntExtra("id",0);
        String name = getIntent().getStringExtra("name");
        setTitleText(name);
        return HealthReportListFragment.newInstance(id);
    }

    @Override
    protected int getLeftButtonResId() {
        return R.mipmap.ic_back;
    }

}
